export const storehouseData = {
  name: null,
  domain: null,
  admin: null,
  approval: null,
  effectiveDate: null,
  type: null,
};
export const taskData = {
  name: null,
  desc: null,
  executor: null,
  personLiable: null,
  effectiveDate: null,
  type: null,
};

interface member {
  columns: Array<any>;
  columnDatas: Array<any>;
}
interface sku {
  columns: Array<any>;
  columnDatas: Array<any>;
  columnDataDefault: any;
}
//页码初始化设置
export const pageInit = {
  page: 1, //页码
  rowsPerPage: 15, //每页显示条数
  per_page: 15, //每页显示条数
  rowsNumber: 0, //总条数
};

export const categoryData: member = {
  columns: [
    {
      name: 'parents',
      label: '父级',
      align: 'left',
      field: 'parents',
    },
    {
      name: 'cat_name',
      label: '分类名称',
      align: 'left',
      field: 'cat_name',
    },
    {
      name: 'image',
      align: 'left',
      label: '图片',
      field: 'image',
    },
    {
      name: 'is_show',
      align: 'center',
      label: '是否显示',
      field: 'is_show',
    },
    {
      name: 'cat_sort',
      align: 'center',
      label: '排序',
      field: 'cat_sort',
    },
    {
      name: 'cat_state',
      align: 'center',
      label: '状态',
      field: 'cat_state',
    },
    {
      name: 'created_at',
      align: 'left',
      label: '创建时间',
      field: 'created_at',
    },
    {
      name: 'operation',
      label: '操作',
      align: 'center',
    },
  ],
  columnDatas: [
    // {
    //   d: 0,
    //   edit: false,
    //   name: 'John Brown',
    //   jobNumber: '0001',
    //   department: 'Siake Park',
    // },
  ],
};

//商品类型
export const goodsTypeData: member = {
  columns: [
    {
      name: 'id',
      label: 'id',
      align: 'left',
      field: 'id',
    },
    {
      name: 'type_name',
      label: '类型名称',
      align: 'left',
      field: 'type_name',
    },
    {
      name: 'type_state',
      align: 'center',
      label: '状态',
      field: 'type_state',
    },
    {
      name: 'created_at',
      align: 'left',
      label: '创建时间',
      field: 'created_at',
    },
    {
      name: 'operation',
      label: '操作',
      align: 'center',
    },
  ],
  columnDatas: [
    // {
    //   d: 0,
    //   edit: false,
    //   name: 'John Brown',
    //   jobNumber: '0001',
    //   department: 'Siake Park',
    // },
  ],
};

//商品标签
export const goodsTagData: member = {
  columns: [
    {
      name: 'id',
      label: 'id',
      align: 'left',
      field: 'id',
    },
    {
      name: 'tag_name',
      label: '标签名称',
      align: 'left',
      field: 'tag_name',
    },
    {
      name: 'tag_sort',
      align: 'center',
      label: '状态',
      field: 'tag_sort',
    },
    {
      name: 'tag_state',
      align: 'center',
      label: '状态',
      field: 'tag_state',
    },
    {
      name: 'created_at',
      align: 'left',
      label: '创建时间',
      field: 'created_at',
    },
    {
      name: 'operation',
      label: '操作',
      align: 'center',
    },
  ],
  columnDatas: [
    // {
    //   d: 0,
    //   edit: false,
    //   name: 'John Brown',
    //   jobNumber: '0001',
    //   department: 'Siake Park',
    // },
  ],
};

//品牌列表
export const brandData: member = {
  columns: [
    {
      name: 'id',
      label: 'id',
      align: 'left',
      field: 'id',
    },
    {
      name: 'logo',
      align: 'left',
      label: 'LOGO',
      field: 'logo',
    },
    {
      name: 'brand_name',
      label: '品牌名称',
      align: 'left',
      field: 'brand_name',
    },
    {
      name: 'cat_name',
      label: '分类名称',
      align: 'left',
      field: 'cat_name',
    },
    {
      name: 'is_host',
      label: '是否推荐',
      align: 'left',
      field: 'is_host',
    },
    {
      name: 'brand_sort',
      align: 'center',
      label: '排序',
      field: 'brand_sort',
    },
    {
      name: 'brand_status',
      align: 'center',
      label: '状态',
      field: 'brand_status',
    },
    {
      name: 'created_at',
      align: 'left',
      label: '创建时间',
      field: 'created_at',
    },
    {
      name: 'operation',
      label: '操作',
      align: 'center',
    },
  ],
  columnDatas: [
    // {
    //   d: 0,
    //   edit: false,
    //   name: 'John Brown',
    //   jobNumber: '0001',
    //   department: 'Siake Park',
    // },
  ],
};

//商品属性
export const goodsAttributeData: member = {
  columns: [
    {
      name: 'attr_id',
      label: 'id',
      align: 'left',
      field: 'attr_id',
    },
    {
      name: 'attr_name',
      label: '属性名称',
      align: 'left',
      field: 'attr_name',
    },
    {
      name: 'type_name',
      align: 'center',
      label: '分类',
      field: 'type_name',
    },
    {
      name: 'is_query',
      align: 'center',
      label: '是否参与筛选',
      field: 'is_query',
    },
    {
      name: 'is_spec',
      align: 'center',
      label: '是否是规格属性',
      field: 'is_spec',
    },
    {
      name: 'attr_type',
      align: 'center',
      label: '属性类型',
      field: 'attr_type',
    },
    {
      name: 'ga_sort',
      align: 'center',
      label: '排序',
      field: 'ga_sort',
    },
    {
      name: 'created_at',
      align: 'center',
      label: '创建时间',
      field: 'created_at',
    },
    {
      name: 'operation',
      label: '操作',
      align: 'center',
    },
  ],
  columnDatas: [
    // {
    //   d: 0,
    //   edit: false,
    //   name: 'John Brown',
    //   jobNumber: '0001',
    //   department: 'Siake Park',
    // },
  ],
};

//商品类型
export const expressTemplateData: member = {
  columns: [
    {
      name: 'id',
      required: true,
      label: 'id',
      align: 'left',
      field: 'id',
    },
    {
      name: 'exp_name',
      required: true,
      label: '模板名称',
      align: 'left',
      field: 'exp_name',
    },
    {
      name: 'exp_price',
      align: 'center',
      label: '价格',
      field: 'exp_price',
    },
    {
      name: 'exp_state',
      align: 'center',
      label: '状态',
      field: 'exp_state',
    },
    {
      name: 'created_at',
      align: 'left',
      label: '创建时间',
      field: 'created_at',
    },
    {
      name: 'operation',
      label: '操作',
      align: 'center',
    },
  ],
  columnDatas: [
    // {
    //   d: 0,
    //   edit: false,
    //   name: 'John Brown',
    //   jobNumber: '0001',
    //   department: 'Siake Park',
    // },
  ],
};

export const listData: member = {
  columns: [
    {
      name: 'goods_id',
      label: '商品id',
      align: 'left',
      field: 'goods_id',
    },
    {
      name: 'goods_name',
      label: '商品名称',
      align: 'left',
      field: 'goods_name',
    },
    {
      name: 'goods_image',
      label: '商品主图',
      align: 'left',
      field: 'goods_image',
    },
    {
      name: 'goods_state',
      align: 'left',
      label: '商品状态',
      field: 'goods_state',
    },
    {
      name: 'price',
      align: 'left',
      label: '价格',
      field: 'price',
    },
    {
      name: 'market_price',
      align: 'left',
      label: '划线价格',
      field: 'market_price',
    },
    {
      name: 'cost_price',
      align: 'left',
      label: '成本价',
      field: 'cost_price',
    },
    {
      name: 'goods_stock',
      align: 'left',
      label: '库存',
      field: 'goods_stock',
    },
    {
      name: 'is_free_shipping',
      align: 'left',
      label: '是否免邮',
      field: 'is_free_shipping',
    },
    {
      name: 'unit',
      align: 'left',
      label: '单位',
      field: 'unit',
    },
    {
      name: 'type_name',
      align: 'left',
      label: '类型名',
      field: 'type_name',
    },
    {
      name: 'created_at',
      align: 'left',
      label: '数据创建时间',
      field: 'created_at',
    },
    {
      name: 'operation',
      label: '操作',
      align: 'center',
    },
  ],
  columnDatas: [
    // {
    //   d: 0,
    //   edit: false,
    //   name: 'John Brown',
    //   jobNumber: '0001',
    //   department: 'Siake Park',
    // },
  ],
};

export const listDataSku: sku = {
  columns: [
    {
      name: 'goods_name',
      label: '商品名称',
      align: 'left',
      field: 'goods_name',
    },

    {
      name: 'price',
      align: 'left',
      label: '价格',
      field: 'price',
    },
    {
      name: 'market_price',
      align: 'left',
      label: '划线价格',
      field: 'market_price',
    },
    {
      name: 'cost_price',
      align: 'left',
      label: '成本价',
      field: 'cost_price',
    },
    {
      name: 'discount_price',
      align: 'left',
      label: '折扣价',
      field: 'discount_price',
    },
    {
      name: 'stock',
      align: 'left',
      label: '库存',
      field: 'stock',
    },
    {
      name: 'max_buy',
      align: 'left',
      label: '限购数量',
      field: 'max_buy',
    },
    {
      name: 'min_buy',
      align: 'left',
      label: '最低购买',
      field: 'min_buy',
    },
    {
      name: 'recommend_way',
      align: 'left',
      label: '推荐方式', //，0：无,1：新品，2：精品，3；推荐
      field: 'recommend_way',
    },
  ],
  columnDatas: [],
  columnDataDefault: {
    index: null,
    goods_name: null,
    edit: true,
    goods_image: null,
    department: null,
    price: null,
    market_price: null,
    cost_price: null,
    goods_stock: null,
    is_free_shipping: null,
    unit: null,
  },
};

export const attr_format: any = {
  columns: [
    {
      name: 'attr_name',
      label: '属性名称',
      align: 'center',
      field: 'attr_name',
    },
    {
      name: 'attr_value',
      label: '属性值',
      align: 'center',
      field: 'attr_value',
    },
    {
      name: 'operation',
      label: '操作',
      align: 'center',
    },
  ],
};

//规格值列表
export const SpecsData: member = {
  columns: [
    {
      name: 'id',
      label: 'id',
      align: 'left',
      field: 'id',
    },
    {
      name: 'spec_name',
      label: '规格名称',
      align: 'left',
      field: 'spec_name',
    },
    {
      name: 'spec_sort',
      align: 'center',
      label: '排序号',
      field: 'spec_sort',
    },
    {
      name: 'search_index',
      align: 'center',
      label: '是否检索',
      field: 'search_index',
    },
    {
      name: 'created_at',
      align: 'left',
      label: '创建时间',
      field: 'created_at',
    },
    {
      name: 'operation',
      label: '操作',
      align: 'center',
    },
  ],
  columnDatas: [],
};

//规格值列表
export const SpecsValueData: member = {
  columns: [
    {
      name: 'id',
      label: 'id',
      align: 'left',
      field: 'id',
    },
    {
      name: 'spec_id',
      align: 'center',
      label: '唯一ID',
      field: 'spec_id',
    },
    {
      name: 'item',
      label: '规格值',
      align: 'left',
      field: 'item',
    },
    {
      name: 'item_sort',
      label: '排序',
      align: 'left',
      field: 'item_sort',
    },
    {
      name: 'created_at',
      align: 'left',
      label: '创建时间',
      field: 'created_at',
    },
    {
      name: 'operation',
      label: '操作',
      align: 'center',
    },
  ],
  columnDatas: [],
};
//规格值
export const specsValue_format: any = {
  columns: [
    {
      name: 'id',
      label: 'id',
      align: 'center',
      field: 'id',
    },
    {
      name: 'item',
      label: '规格值',
      align: 'center',
      field: 'item',
    },
    {
      name: 'item_sort',
      label: '规格排序',
      align: 'center',
      field: 'item_sort',
    },
    {
      name: 'operation',
      label: '操作',
      align: 'center',
    },
  ],
};

//优惠券列表
export const CouponData: member = {
  columns: [
    {
      name: 'coupon_id',
      label: '优惠券id',
      align: 'left',
      field: 'coupon_id',
      width: '50px',
    },
    {
      name: 'coupon_type',
      align: 'left',
      label: '优惠券类型',
      field: 'coupon_type',
    },
    {
      name: 'coupon_name',
      label: '名称',
      align: 'left',
      field: 'coupon_name',
    },
    {
      name: 'issue_count',
      label: '发放数量',
      align: 'left',
      field: 'issue_count',
    },
    {
      name: 'image_uri',
      label: '图片',
      align: 'left',
      field: 'image_uri',
    },
    {
      name: 'created_at',
      align: 'left',
      label: '创建时间',
      field: 'created_at',
    },
    {
      name: 'operation',
      label: '操作',
      align: 'center',
    },
  ],
  columnDatas: [],
};
